package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: dixithk
 * Date: 6/12/14
 * Time: 2:55 PM
 * To change this template use File | Settings | File Templates.
 */
public class Menu  {

    List<String> optionsForDisplay= new ArrayList<String>();

    public List<String> setOptions(List<MenuOperations> options)
    {

        for (MenuOperations option : options) {
            optionsForDisplay.add(option.getName() );
        }
        return optionsForDisplay;
    }
    



    public boolean isValidOption(int choice)  throws NumberFormatException
    {
        if(choice >= 1 && choice <= 4)
            return true;
        else {

            throw new NumberFormatException();
        }
    }



}
